import Vue from 'vue'
import VueRouter from 'vue-router'

import Index from '@/views/Index'
import News from '@/views/News'
import Sports from '@/views/Sports'
import HomePage from '@/second/HomePage'
import International from '@/second/International'
import Domestic from '@/second/Domestic'

Vue.use(VueRouter)

const router = new VueRouter({
  routes: [
    {
      path: '/',
      redirect:Index
    },
    {
      path: '/index',
      component:Index
    },
    {
      path: '/news',
      component:News
    },
    {
      path: '/sports',
      component: Sports,
      children: [
        {
          path: 'homepage',
          component:HomePage
        },
        {
          path: 'international',
          component:International
        },
        {
          path: 'domestic',
          component:Domestic
        }
      ]
    }
  ]
})

export default router